if status is-interactive
    # Commands to run in interactive sessions can go here
    set -x PATH /home/hanzi/bin $PATH
    set -x PATH /home/hanzi/proj/scripts $PATH
    set -x PATH ~/data/go/bin/ $PATH
    set -x PATH ~/.npm-global/bin/ $PATH
    set -x PATH ~/.local/bin/ $PATH
    set -x PAGER most
    set -x TERM xterm-256color
    set -x GOPATH ~/data/go/
    set -x GOPROXY "https://goproxy.cn,direct"

    # abbr
    abbr -a -g e clear

end

function proxy
	set -xg ALL_PROXY http://localhost:7890
end

function noproxy
	set -e ALL_PROXY
end

function fish_mode_prompt
  switch $fish_bind_mode
    case default
      echo -en "\e[2 q"
      set_color -o brmagenta
      echo "["
      set_color -o brred
      echo "N"
      set_color -o brmagenta
      echo "] "
    case insert
      echo -en "\e[6 q"
      set_color -o brmagenta
      echo "["
      set_color -o brgreen
      echo "I"
      set_color -o brmagenta
      echo "] "
    case replace_one
      echo -en "\e[4 q"
      set_color -o brmagenta
      echo "["
      set_color -o bryellow
      echo "R"
      set_color -o brmagenta
      echo "] "
    case visual
      echo -en "\e[2 q"
      set_color -o brgreen
      echo "["
      set_color -o brmagenta
      echo "V"
      set_color -o brgreen
      echo "] "
    case '*'
      echo -en "\e[2 q"
      set_color -o brwhite
      echo "["
      set_color -o brred
      echo "?"
      set_color -o brwhite
      echo "] "
  end
  set_color normal
end

